home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 February / EnigmA AMIGA RUN 34 (1999)(G.R. Edizioni)(IT)[!][issue 1999-02].iso / www / active-net / support / updates / stfax32upd.lha / Update STFax < prev    next >
Text File  |  1998-03-13  |  4KB  |  147 lines

  1. ; $VER: STFax-Update 1.2 (8.3.98)
  2. ;
  3. ; Script by Simone Tellini <wiz@pragmanet.it>
  4. ;
  5.  
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. ;  set initial variables
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9.  
  10. (set @app-name  "STFax Professional")
  11. (set OldVersion "3.1")
  12. (set NewVersion "3.2")
  13. (set OldFile    "STFax:STFax")
  14. (set OldSize    371920)
  15. (set PatchFile  "STFax.patch")
  16. (set @error-msg "An unexpected error has occured. Installation aborted.")
  17.  
  18. (if (= (exists OldFile (noreq)) 0)
  19.     (if (= (exists (cat OldFile ".old") (noreq)) 0)
  20.         (abort @app-name OldVersion " has not been found!")
  21.         (set OldFile (cat OldFile ".old"))
  22.     )
  23. )
  24.  
  25. (if (<> (getsize OldFile) OldSize)
  26.     (abort @app-name " has a different size than the expected one, "
  27.            "patch can't be applied.")
  28. )
  29.  
  30. (complete 0)
  31.  
  32. (welcome)
  33.  
  34. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  35. ;  Patch the file
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37.  
  38. (if (<> OldFile "STFax:STFax.old")
  39.   (
  40.     (if (exists "STFax:STFax.old")
  41.         (delete "STFax:STFax.old")
  42.     )
  43.  
  44.     (rename OldFile "STFax:STFax.old")
  45.  
  46.     (set OldFile (cat OldFile ".old"))
  47.   )
  48. )
  49.  
  50. (complete 20)
  51.  
  52. (working "Applying the patch...")
  53.  
  54. (run (cat "Patch " OldFile " STFax:STFax " PatchFile)
  55.     (prompt "Applying the patch...")
  56. )
  57.  
  58. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  59. ;  Copy docs, if they exists
  60. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  61.  
  62. (if (exists "STFax.guide")
  63.     (copyfiles
  64.         (source "STFax.guide")
  65.         (dest "STFax:")
  66.     )
  67. )
  68.  
  69. (complete 35)
  70.  
  71. (if (exists "History.txt")
  72.     (copyfiles
  73.         (source "History.txt")
  74.         (dest "STFax:")
  75.     )
  76. )
  77.  
  78. (complete 40)
  79.  
  80. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  81. ;  Install new catalogs
  82. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  83.  
  84. (if (exists "Catalogs")
  85.     (copyfiles
  86.         (prompt "Updating catalog files")
  87.         (help @copyfiles-help)
  88.         (source "Catalogs")
  89.         (dest "STFax:Catalogs")
  90.         (choices "italiano")
  91.         (confirm)
  92.     )
  93. )
  94.  
  95. (complete 60)
  96.  
  97. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  98. ;  Copy Textinput.mcc
  99. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  100.  
  101. (if (exists "MUI/Textinput.mcc")
  102.  
  103.     (copylib
  104.            (prompt "Installing updated MUI classes... (Textinput.mcc)")
  105.            (help   "This will install some MUI classes needed by STFax")
  106.            (source "MUI/Textinput.mcc")
  107.            (dest   "MUI:Libs/MUI")
  108.            (confirm)
  109.     )
  110.  
  111.     (complete 70)
  112.  
  113.     (copylib
  114.            (prompt "Installing updated MUI classes... (Textinput.mcp)")
  115.            (help   "This will install some MUI classes needed by STFax")
  116.            (source "MUI/Textinput.mcp")
  117.            (dest   "MUI:Libs/MUI")
  118.            (confirm)
  119.     )
  120.  
  121.     (complete 85)
  122.  
  123.     (copylib
  124.            (prompt "Installing updated MUI classes... (Textinputscroll.mcc)")
  125.            (help   "This will install some MUI classes needed by STFax")
  126.            (source "MUI/Textinputscroll.mcc")
  127.            (dest   "MUI:Libs/MUI")
  128.            (confirm)
  129.     )
  130. )
  131.  
  132. (complete 90)
  133.  
  134. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  135. ;  End
  136. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  137.  
  138. (message @app-name " has been upgraded from version " OldVersion " to " NewVersion
  139.          "\n\nThe old STFax version has been renamed as STFax:STFax.old")
  140.  
  141. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  142. ;  All done.
  143. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  144.  
  145. (complete 100)
  146.  
  147.